// packageH/chitchat/components/chatListItem/chatListItem.js
Component({
  /**
     * 组件的属性列表
     */
  properties: {
    item:{
      type:Object,
      value:{}
    },
    chatType:{
      type:Number,
      value:null
    }
  },

  /**
     * 组件的初始数据
     */
  data: {

  },

  /**
     * 组件的方法列表
     */
  methods: {
 
    del_handle(){
        this.triggerEvent("del_record",this.data.item)
    },
    chearRead(){
      let item = this.data.item;
      item.un_read_num=0;
      this.setData({item});
 
      if(this.data.chatType==2){
        wx.navigateTo({
          url: '/packageH/chitchat/chatWindow/chatWindow?chatType=2&user_id=' + item.uid +'&queue_id='+item.id,
        });
      }else if(this.data.chatType==1){
        wx.navigateTo({
          url: '/packageH/chitchat/chatWindow/chatWindow?chatType=1&groupId=' + item.group_id + "&employeeId=" + item.employee_id,
        });
      }
    }
  }
});
